package cn.liontalk.demo;

/**
 * @author ZhouZhe
 * @version 1.0
 * @description 可重入粒度测试 调用类内部的方法
 * @date 2019-01-27 13:00
 **/
public class SynchronizedOtherMethod11 {


     private synchronized void method1(){
         System.out.println("我是方法1");
         method2();
     }

     private synchronized void method2(){
         System.out.println("我是方法2");
     }


    public static void main(String[] args) {
         SynchronizedOtherMethod11 instance = new SynchronizedOtherMethod11();
         instance.method1();

    }
}
